Skip to content

Conversation

Vixtir
Copy link
Contributor

@Vixtir Vixtir commented Oct 5, 2025

  • Breaking change? (if so, please describe the impact and migration path for existing application instances)

What changes did you make? (Give an overview)

Is there anything you'd like reviewers to focus on?

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • No need to
  • Manually (please, describe, if necessary)
  • Unit checks
  • Integration checks
  • Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct

A picture of a cute animal (not mandatory but encouraged)

@Vixtir Vixtir requested review from a team as code owners October 5, 2025 12:03
@kapybro kapybro bot added status/triage Issues pending maintainers triage status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Oct 5, 2025
@Vixtir Vixtir linked an issue Oct 5, 2025 that may be closed by this pull request
2 tasks
@Haarolean Haarolean added the hacktoberfest-accepted PRs accepted towards hacktoberfest goal and will be counted as approved label Oct 5, 2025
@Mgrdich Mgrdich requested a review from Copilot October 13, 2025 10:28
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces optional Full Text Search (FTS) functionality across the frontend application, allowing users to toggle between regular and full text search modes for various resources.

  • Adds FTS UI components and hooks for managing FTS state
  • Integrates FTS toggle functionality into search interfaces for topics, schemas, consumer groups, connectors, and ACLs
  • Updates API hooks to support FTS parameter passing
  • Enhances search component to support additional actions alongside the clear button

Reviewed Changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
frontend/src/theme/theme.ts Adds theme colors for FTS icon states
frontend/src/lib/hooks/api/*.ts Updates API hooks to accept and pass FTS parameter
frontend/src/components/contexts/ClusterContext.ts Adds FTS configuration properties to cluster context
frontend/src/components/common/Tooltip/Tooltip.tsx Adds fullWidth prop for tooltip styling
frontend/src/components/common/Search/* Refactors search component to support additional actions
frontend/src/components/common/Icons/FtsIcon.tsx Adds FTS toggle icon component
frontend/src/components/common/Fts/* Implements FTS hook and component for state management
frontend/src/components//List/ Integrates FTS functionality into list pages

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 47 to +48
width: 'max-content',
minWidth: fullWidth ? 'max-content' : 'initial',
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minWidth property logic seems inverted. When fullWidth is true, setting minWidth: 'max-content' doesn't achieve full width behavior. Consider using width: '100%' or removing the minWidth property when fullWidth is true.

Suggested change
width: 'max-content',
minWidth: fullWidth ? 'max-content' : 'initial',
width: fullWidth ? '100%' : 'max-content',
minWidth: 'initial',

Copilot uses AI. Check for mistakes.

search?: string,
fts?: boolean
) => {
const base = ['clusters', clusterName, 'connectors', fts, 'fts'];
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The query key includes both the fts boolean value and the string 'fts', which creates inconsistent cache keys. When fts is undefined, the key becomes [..., undefined, 'fts']. Consider using a more structured approach like { fts } or only include 'fts' when the feature is enabled.

Copilot uses AI. Check for mistakes.


return {
handleSwitch,
isFtsFetureEnabled: isFtsFeatureEnabled,
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'isFtsFetureEnabled' to 'isFtsFeatureEnabled'.

Suggested change
isFtsFetureEnabled: isFtsFeatureEnabled,
isFtsFeatureEnabled: isFtsFeatureEnabled,

Copilot uses AI. Check for mistakes.

{...inputOptions}
/>
{clearIcon}
{search && clearIcon}
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conditional rendering of clearIcon only when search is true may break existing functionality. The clearIcon prop was previously always rendered regardless of the search prop. This could be a breaking change if components rely on clearIcon being displayed in non-search contexts.

Suggested change
{search && clearIcon}
{clearIcon}

Copilot uses AI. Check for mistakes.

Comment on lines +64 to +65
ftsEnabled: false,
ftsDefaultEnabled: false,
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The FTS properties are hardcoded to false in ClusterPage. This suggests the FTS feature configuration is not yet properly integrated from the backend cluster data. Consider implementing proper feature detection based on cluster capabilities.

Suggested change
ftsEnabled: false,
ftsDefaultEnabled: false,
ftsEnabled: features.includes(ClusterFeaturesEnum.FTS_ENABLED),
ftsDefaultEnabled: features.includes(ClusterFeaturesEnum.FTS_DEFAULT_ENABLED),

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted PRs accepted towards hacktoberfest goal and will be counted as approved status/triage/completed Automatic triage completed status/triage/manual Manual triage in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support per-request control for enabling/disabling FTS

3 participants